package inc.gome.dynamic.datasource.dynamic;

import com.google.inject.AbstractModule;
import org.jclouds.domain.Credentials;

import java.util.Objects;

public class AuthenticationModule extends AbstractModule {

    private final Credentials credentials;

    public AuthenticationModule(final Credentials authentication) {
        this.credentials = Objects.requireNonNull(authentication);
    }

    @Override
    protected void configure() {
        bind(Credentials.class).toProvider(new AuthenticationProvider(credentials));
    }
}